﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>我的信息</title>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/ydui.css?v=1.1.4" rel="stylesheet" />
    <script src="../js/ydui.flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/all.css?v=20180302" />

</head>
<body ms-controller="indexview" class="ms-controller">
    <section class="g-flexview">
        <header class="m-navbar">
            <a onclick="history.go(-1)" class="navbar-item"><i class="back-ico"></i></a>
            <div class="navbar-center">
                <span class="navbar-title">我的信息</span>
            </div>
        </header>
        <!--<section>-->
        <section class="g-scrollview">

            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left" style="color:red;">单位信息</div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">单位名称：</div>
                    <div class="cell-right"><input type="text" class="cell-input" placeholder="单位名称" autocomplete="off" readonly="readonly" style="color:red;" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">单位地址：</div>
                    <div class="cell-right"><input type="text" class="cell-input" placeholder="单位地址" autocomplete="off" ms-duplex="@ModelData.FVendorName" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">营业执照：</div>
                    <div class="cell-right"><input type="text" class="cell-input" placeholder="营业执照" autocomplete="off" ms-duplex="@ModelData.FItemName" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">道路运输许可证：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="道路运输许可证" autocomplete="off" ms-duplex="@ModelData.FQty" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">联系人姓名：</div>
                    <div class="cell-right"><input type="text" class="cell-input" placeholder="联系人姓名" autocomplete="off" ms-duplex="@ModelData.FNote" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">联系人电话：</div>
                    <div class="cell-right"><input type="text" class="cell-input" placeholder="联系人电话" autocomplete="off" ms-duplex="@ModelData.FNote" /></div>
                </div>


            </div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left" style="color:red;">车辆信息</div>

                </div>
                <div class="cell-item">
                    <div class="cell-left">车牌号码：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车牌号码" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车牌颜色：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车牌颜色" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">生产厂家：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="生产厂家" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">挂牌时间：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="挂牌时间" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车型：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车型" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">吨位：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="吨位" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车厢形式：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车厢形式" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">年检月份：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="年检月份" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">营运检月份：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="营运检月份" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车厢尺寸：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="长   宽   高" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">是否挂靠：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="是否挂靠" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车主电话：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车主电话" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">车辆保险信息：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="车辆保险信息" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">投保公司名称：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="投保公司名称" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">保额：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="保额" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">期限：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="期限" autocomplete="off" /></div>
                </div>

            </div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left" style="color:red;">司机信息</div>

                </div>
                <div class="cell-item">
                    <div class="cell-left">驾驶员姓名：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="驾驶员姓名" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">身份证号码：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="身份证号码" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">籍贯：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="籍贯" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">联系电话：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="联系电话" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <label class="cell-right cell-arrow">
                        <select class="cell-select">
                            <option value="">准驾车型</option>
                            <option value="1">C1</option>
                            <option value="2">C1</option>
                            <option value="3">C1</option>
                        </select>
                    </label>
                </div>

                <div class="cell-item">
                    <div class="cell-left">取证时间：</div>
                    <div class="cell-right"><input type="number" pattern="[0-9]*" class="cell-input" placeholder="驾驶证、身份证 从业资格证拍照上传" autocomplete="off" /></div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">密码：</div>
                    <div class="cell-right"><input type="password" class="cell-input" placeholder="输入密码" autocomplete="off" /></div>
                </div>
                <button type="button" class="btn-block btn-primary">保存</button>

            </div>
        </section>






        <footer class="m-tabbar">
            <a href="index.html" class="tabbar-item">
                <span class="tabbar-icon">
                    <i class="iconfont icon-home_light"></i>
                </span>
                <span class="tabbar-txt">首页</span>
            </a>

            <a href="orderlist.html" class="tabbar-item">
                <span class="tabbar-icon">
                    <i class="iconfont icon-dingdan1"></i>
                </span>
                <span class="tabbar-txt">送件查询</span>
            </a>
            <a href="driveinfo.html" class="tabbar-item    tabbar-active">
                <span class="tabbar-icon">
                    <i class="iconfont icon-fenlei1"></i>
                </span>
                <span class="tabbar-txt">我的资料</span>
            </a>
        </footer>
    </section>
    <script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
    <script src="../js/ydui.js"></script>
    <script src="../js/avalon.mobile.min.js"></script>
    <script src="../js/ComFunJS.js?v=201803071"></script>
    <script>

        $('[data-jui-slider]').slider({ lazyLoad: true });

        //$('.m-list').find('img').lazyLoad({ binder: '.g-scrollview' });
        //var fptno = randomString(12);
        //document.getElementById("txtfptno").value = fptno;

       // alert(fptno);

        function randomString(len) {
            　　len = len || 32;
            　　var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
            　　var maxPos = $chars.length;
            　　var pwd = '';
            　　for (i = 0; i < len; i++) {
                　　　　pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
            　　}
            　　return pwd;
        }
        var model = avalon.define({
            $id: "indexview",
            ModelData: { "FVendorName": "", "FPTNO": "", "FItemName": "", "FQty": "","FNote":""},
            ListData1: [],

            GetListData: function () {
                var username = ComFunJS.getToken();
                $.getJSON("/api/user/buyapply/15", { FPTNO: document.getElementById("txtfptno").value}, function (r) {
                    if (r.error == "") {
                        model.ListData1 = r.result;
                    }
                })

            },
            AddItem: function () {

                $.post("/api/user/buyapplyitem", { "FPTNO": document.getElementById("txtfptno").value, "FVendorName": model.ModelData.FVendorName, "FItemName": model.ModelData.FItemName, "FQty": model.ModelData.FQty, "FNote": model.ModelData.FNote }, function (r) {

                    if (r.error == "") {
                        YDUI.dialog.toast("新增成功", 'success', 1500, function () {

                            model.ModelData.FItemName = "";
                            model.ModelData.FQty = "";
                            model.ModelData.FNote = "";
                            model.GetListData();
                        })

                    } else {
                        YDUI.dialog.toast(r.error, 'none', 1500);
                    }

                })

            }
            ,
            Save: function () {

                $.post("/api/user/buyapplysave", { "FPTNO": document.getElementById("txtfptno").value}, function (r) {

                    if (r.error == "") {
                        YDUI.dialog.toast("保存成功", 'success', 1500, function () {
                            document.getElementById("txtfptno").value = "";
                            model.ModelData.FVendorName = "";
                            model.ModelData.FItemName = "";
                            model.ModelData.FQty = "";
                            model.ModelData.FNote = "";

                        })

                    } else {
                        YDUI.dialog.toast(r.error, 'none', 1500);
                    }

                })

            }

        });
        avalon.ready(function () {


           // model.GetListData();
        })


    </script>
</body>
</html>
